//
//  DDJobDescriptionCell.m
//  DingDongZP
//
//  Created by Jyh on 16/3/27.
//  Copyright © 2016年 iyhjiang.com. All rights reserved.
//

#import "DDJobDescriptionCell.h"

@implementation DDJobDescriptionCell

- (void)awakeFromNib {
    // Initialization code
    self.detailView.layer.cornerRadius = 5;
    self.detailView.layer.borderColor = COLOR_BORDER_GRAY.CGColor;
    self.detailView.layer.borderWidth = 0.5;
    self.jobDescriptionLabel.text = @"";
}

- (void)updateJobDescriptionCellWithInfo:(DDJobsDetail *)detailInfo
{
    [self.jobDescriptionLabel removeFromSuperview];
    [self.detailView addSubview:self.jobDescriptionLabel];
    
    
    NSMutableAttributedString *attr = [DDUtils attrWithString:10 font:[UIFont systemFontOfSize:13] text:!detailInfo.jobdesc?@"未填写":detailInfo.jobdesc];
    self.jobDescriptionLabel.attributedText = attr;
    
    WEAKSELF
    [self.jobDescriptionLabel mas_makeConstraints:^(MASConstraintMaker *make) {
        make.top.mas_equalTo(weakSelf.detailView.mas_top).offset(45);
        make.left.mas_equalTo(weakSelf.detailView.mas_left).offset(15);
        make.right.mas_equalTo(weakSelf.detailView.mas_right).offset(-15);
        make.bottom.mas_equalTo(weakSelf.detailView.mas_bottom).offset(-5);
    }];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
